/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "eme_causa_atencion")
@NamedQueries({
    @NamedQuery(name = "EmeCausaAtencion.findAll", query = "SELECT e FROM EmeCausaAtencion e")})
public class EmeCausaAtencion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "fca_id")
    private Integer fcaId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 128)
    @Column(name = "fca_nombre")
    private String fcaNombre;
    @Column(name = "fca_puntaje")
    private Integer fcaPuntaje;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fca_estado")
    private int fcaEstado;
    @OneToMany(mappedBy = "emeCausaAtencion", fetch = FetchType.LAZY)
    private List<EmeTriaje> emeTriajeList;

    public EmeCausaAtencion() {
    }

    public EmeCausaAtencion(Integer fcaId) {
        this.fcaId = fcaId;
    }

    public EmeCausaAtencion(Integer fcaId, String fcaNombre, int fcaEstado) {
        this.fcaId = fcaId;
        this.fcaNombre = fcaNombre;
        this.fcaEstado = fcaEstado;
    }

    public Integer getFcaId() {
        return fcaId;
    }

    public void setFcaId(Integer fcaId) {
        this.fcaId = fcaId;
    }

    public String getFcaNombre() {
        return fcaNombre;
    }

    public void setFcaNombre(String fcaNombre) {
        this.fcaNombre = fcaNombre;
    }

    public Integer getFcaPuntaje() {
        return fcaPuntaje;
    }

    public void setFcaPuntaje(Integer fcaPuntaje) {
        this.fcaPuntaje = fcaPuntaje;
    }

    public int getFcaEstado() {
        return fcaEstado;
    }

    public void setFcaEstado(int fcaEstado) {
        this.fcaEstado = fcaEstado;
    }

    public List<EmeTriaje> getEmeTriajeList() {
        return emeTriajeList;
    }

    public void setEmeTriajeList(List<EmeTriaje> emeTriajeList) {
        this.emeTriajeList = emeTriajeList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fcaId != null ? fcaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmeCausaAtencion)) {
            return false;
        }
        EmeCausaAtencion other = (EmeCausaAtencion) object;
        if ((this.fcaId == null && other.fcaId != null) || (this.fcaId != null && !this.fcaId.equals(other.fcaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.EmeCausaAtencion[ fcaId=" + fcaId + " ]";
    }
    
}
